import { createRouter, createWebHistory } from 'vue-router'
import home from '../views/home.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  
  routes: [
    {
      path: '/',
      name: 'login',
      component: ()=> import('../views/login.vue')
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children:[
        {
          path: '/statistics',
          name: 'statistics',
          component: ()=> import('../views/statistics.vue')
        },
        
        {
          path: '/administrator',
          name: 'administrator',
          component: ()=> import('../views/administrator.vue')
        },
        {
          path: '/UserManagement',
          name: 'UserManagement',
          component: ()=> import('../views/UserManagement.vue')
        },
        {
          path: '/MerchantManagement',
          name: 'MerchantManagement',
          component: ()=> import('../views/MerchantManagement.vue')
        },
        {
          path: '/ProductManagement',
          name: 'ProductManagement',
          component: ()=> import('../views/ProductManagement.vue')
        },
        {
          path: '/PointsManagement',
          name: 'PointsManagement',
          component: ()=> import('../views/PointsManagement.vue')
        },
        {
          path: '/MenbershipManagement',
          name: 'MenbershipManagement',
          component: ()=> import('../views/MenbershipManagement.vue')
        },
        {
          path: '/CustomerService',
          name: 'CustomerService',
          component: ()=> import('../views/CustomerService.vue')
        },
        {
          path: '/ThirdPartyManagemen',
          name: 'ThirdPartyManagemen',
          component: ()=> import('../views/ThirdPartyManagemen.vue')
        },
        {
          path: '/CountryManagement',
          name: 'CountryManagement',
          component: ()=> import('../views/CountryManagement.vue')
        },
        {
          path: '/FavoriteManagement',
          name: 'FavoriteManagement',
          component: ()=> import('../views/FavoriteManagement.vue')
        },
        {
          path: '/SystemSettings',
          name: 'SystemSettings',
          component: ()=> import('../views/SystemSettings.vue')
        },
      ]
    },
    
    
  ]
})

export default router
